<?php
if(!defined('IN_SING')) {
	exit('Access Denied');
}
class dbt_init_user extends sing_table{
	
	public function __construct() {
		$this->_table = 'common_online';
		$this->_pk    = 'username';
		parent::__construct();
	}
	
	public function getMember($user){
		return DB::fetch_first("SELECT o.username, m.id, m.password , m.rand ,o.logintime, o.lasttime, m.status,m.cid,m.gold  FROM %t as o,%t as m WHERE o.`username` = %s and o.`username` = m.`username`", array($this->_table, 'account' , $user));	
	}
	
	public function getUsr($user){
		return DB::fetch_first("SELECT o.username, m.memberid, m.password , m.rand ,o.logintime, o.lasttime,m.groupid , m.deid, m.status ,m.relname  FROM %t as o,%t as m WHERE o.`username` = %s and o.`username` = m.`membername`", array($this->_table, 'member' , $user));	
	}
}

?>